﻿using BW.MesProject.Public.Application.Dto.Input;
using BW.MesProject.Public.Application.Dto.Output;
using BW.MesProject.Public.Domain.RBAC;
using BW.MesProject.Public.ErrorCode;

namespace BW.MesProject.Public.Application
{
    /// <summary>
    /// 用户服务接口
    /// </summary>
    public interface IUserServices
    {
        /// <summary>
        /// 用户登录
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        ApiResult<UserLoginOutput> UserLogin(UserLoginInput input);


        /// <summary>
        /// 查询
        /// </summary>
        /// <param name="UserName"></param>
        /// <param name="pagesize"></param>
        /// <param name="pageNum"></param>
        /// <param name="DepId"></param>
        /// <returns></returns>
        ApiResult<List<UserLoginOutput>> GetUser(string? UserName, int pagesize, int pageNum, string DepId);

        /// <summary>
        /// 查询
        /// </summary>
        /// <param name="qryInput"></param>
        /// <returns></returns>
        ApiResult<List<EMPOut>> GetUserNew(QryInput qryInput);

        /// <summary>
        /// 新增
        /// </summary>
        /// <param name="User"></param>
        /// <returns></returns>
        ApiResult<int> AddUser(UserModel User);

        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        ApiResult<int> UpdateUser(UserModel model);

        /// <summary>
        /// 修改启用
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
       ApiResult<int> UpdateEnable(UserModel model);
        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="Id"></param>
        /// <returns></returns>
        ApiResult<int> UpdateDelete(string Id);

        /// <summary>
        /// 查询表是否有该编码
        /// </summary>
        /// <param name="UserId"></param>
        /// <returns></returns>
        ApiResult<int> GetUserId(string UserId);
    }
}
